package com.middlegroup.pay.service;

import com.middlegroup.common.model.PayRequest;
import com.middlegroup.common.model.RefundRequestDto;
import com.middlegroup.common.model.TransResult;

import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author pc
 * @date 2019/1/23
 */
public interface WechatPayH5Service {


    /**异常必须处理，并一定要返回TransResult
     * @param request
     * @return
     */
    TransResult wechatPayH5(PayRequest request);

    /**异常必须处理，并一定要返回TransResult
     * @param request
     * @return
     */
    TransResult wechatPayH5Query(PayRequest request);

    /**异常必须处理，并一定要返回TransResult
     * @param request
     * @return
     */
    String wechatPayH5Notify(HttpServletRequest request) throws Exception;


    /**异常必须处理，并一定要返回TransResult
     * @param request
     * @return
     */
    TransResult wechatPayH5Refund(RefundRequestDto request);

    /**异常必须处理，并一定要返回TransResult
     * @param merchantBillNo
     * @return
     */
    TransResult wechatPayH5RefundQuery(String merchantBillNo);

    /**异常必须处理，并一定要返回TransResult
     * @param request
     * @return
     */
    String wechatH5RefundNotify(HttpServletRequest request) throws Exception;
}
